import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-27
 * Time: 17:16
 */
public class Main {
    public static void main(String[] args) {
        Random random =new Random();
        int number = random.nextInt(100);//[0,100)
        System.out.println(number);
        boolean flag = true;
        while (flag) {
            Scanner sc =new Scanner(System.in);
            System.out.println("请输入你要猜的数字");
            int n = sc.nextInt();
            if (number > n) {
                System.out.println("猜小了");
            }else if (n > number) {
                System.out.println("猜大了");
            }else {
                System.out.println("恭喜你猜对了");
                break;
            }
        }
    }
}
